package com.zhdl.network.modbustcp.dto;

import com.project.common.bean.FrameDto;
import org.tio.core.intf.Packet;

/**
 * modbus 协议的 packet
 */
public class ModbusPacket extends Packet implements FrameDto {
    public static final String CHARSET = "utf-8";
    private static final long serialVersionUID = -172060606924066412L;

    /**
     * 数据单元，接收时拼出的单元数据
     */
    private byte[] unitBuff;

    /**
     * 完整数据包，发送时有值，接收时为null
     */
    private byte[] fullBuff;

    /**
     * 正常功能码
     */
    private String resCode;

    public byte[] getUnitBuff() {
        return unitBuff;
    }

    public void setUnitBuff(byte[] unitBuff) {
        this.unitBuff = unitBuff;
    }

    public byte[] getFullBuff() {
        return fullBuff;
    }


    public void setFullBuff(byte[] fullBuff) {
        this.fullBuff = fullBuff;
    }

    @Override
    public String getResCode() {
        return resCode;
    }

    @Override
    public void setResCode(String resCode) {
        this.resCode = resCode;
    }
}
